#pragma once
#ifndef PROJECTILEMANAGER_H
#define PROJECTILEMANAGER_H

#include <vector>
#include "Vector2D.h"
class CEntityProjectile;
using namespace std;


enum eProjectileTemplate
{
	eProjectileFireBallUp,
	eProjectileFireBallLeft,
	eProjectileFireBallRight,
	eProjectileStar,
	eProjectileLaser
};
class CProjectileManager
{
private:
	static CProjectileManager* instance;

	vector<CEntityProjectile*> vectorProjectileTemplate;

	int indexFirstProjectile;
	int indexLastProjectile;

protected:
	CProjectileManager(void);
	~CProjectileManager(void);

public:
	static CProjectileManager& getInstance(void);
	void CProjectileManager::Close(void);

	void CProjectileManager::createProjectileTemplate(int indexSprite, int indexFrame, int health,  
		 CVector2D speed, int collisionCost, int side, int offsetX, int offsetY);

	void CProjectileManager::createAllProjectile(int numberOfProjectile);
	void CProjectileManager::spawnProjectile(CEntityProjectile* modelProjectile, int positionX, int positionY);

	CEntityProjectile* CProjectileManager::getProjectileTemplate(int index);
	int CProjectileManager::getIndexFirstProjectile(void)const;
	int CProjectileManager::getIndexLastProjectile(void)const;

	void CProjectileManager::setIndexFirstProjectile(int indexFirstProjectile);
	void CProjectileManager::setIndexLastProjectile(int indexLastProjectile);


};
#define PROJECTILEMANAGER CProjectileManager::getInstance()

#endif